import os
os.chdir(os.path.dirname(__file__))
print os.path.abspath(os.curdir)

from Crypto.PublicKey import RSA
print "generate rsa private key and public key ..."
private = RSA.generate(1024)
public = private.publickey()
print "write to ../server/fetch.key and ../local/proxy.key"
open("../server/fetch.key","wb").write(private.exportKey())
open("../local/proxy.key","wb").write(public.exportKey())
print "done"
